import { z as ref, B as onLoad, am as mineServiceContent, c as createBlock, w as withCtx, j as resolveEasycom, G as __easycom_0, k as resolveDynamicComponent, o as openBlock, b as createVNode, i as index$g, an as index$l, ag as navigateBack } from './index-Cc4oxzDN.js';
import { _ as __easycom_3 } from './layout.FALqt04o.js';

const _sfc_main = {
  __name: 'content',
  setup(__props) {

const title = ref('内容');
const content = ref('');

// 返回上一页
const $onClickLeft = () => {
	navigateBack();
};

onLoad((option) => {
	if (option.name) {
		title.value = option.name;
	}
	if (option.id) {
		getContent(option.id);
	}
});	
const getContent = async(id) => {
	let data = await mineServiceContent({id:id});
	if (data) {
		content.value = data.content;
	}
};



return (_ctx, _cache) => {
  const _component_uv_navbar = resolveEasycom(resolveDynamicComponent("uv-navbar"), __easycom_0);
  const _component_v_uni_rich_text = index$l;
  const _component_v_uni_view = index$g;
  const _component_layout = resolveEasycom(resolveDynamicComponent("layout"), __easycom_3);

  return (openBlock(), createBlock(_component_layout, null, {
    default: withCtx(() => [
      createVNode(_component_uv_navbar, {
        fixed: true,
        title: title.value,
        "left-arrow": "",
        onLeftClick: $onClickLeft
      }, null, 8, ["title"]),
      createVNode(_component_v_uni_view, null, {
        default: withCtx(() => [
          createVNode(_component_v_uni_rich_text, { nodes: content.value }, null, 8, ["nodes"])
        ]),
        _: 1
      })
    ]),
    _: 1
  }))
}
}

};

export { _sfc_main as default };
